package com.yun.zf.common.admin.dto.order;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class SubOrderDto {
    @ApiModelProperty(value = "子订单id")
    private String subOrderId;
    @ApiModelProperty(value = "订单编号")
    private String orderId;
    @ApiModelProperty(value = "款项说明")
    private String moneyExplain;
    @ApiModelProperty(value = "款项金额")
    private BigDecimal amount;
    @ApiModelProperty(value = "款项类型1 业主，2客户")
    private Integer moneyType;
    @ApiModelProperty(value = "折扣系数默认为1")
    private BigDecimal rate;
    @ApiModelProperty(value = "订单状态")
    private String orderStatus;
    @ApiModelProperty(value = "订单状态名称")
    private String statusName;

    @ApiModelProperty(value = "联系人")
    private String name;
    @ApiModelProperty(value = "电话")
    private String iphone;

    public String getStatusName() {
        String s = "";
        switch (orderStatus) {
            case "paying":
                s = "待支付";
                break;
            case "successful":
                s = "已支付";
                break;
            case "faild":
                s = "支付失败";
                break;
            case "cancel":
                s = "取消支付";
                break;
        }
        return s;
    }
}
